module Mephisto
  module Plugins
    class CommentDefensio < Mephisto::Plugin
      author 'Chris Anderton'
      version '0.3'
      homepage 'http://www.thewebfellas.com/'
      notes 'Mephisto plugin providing Defensio spam filtering to comments'

      option :defensio_url, ''
      option :defensio_key, ''

      class Schema < ActiveRecord::Migration
        def self.install
          add_column "contents", "spam_signature", :string
          add_column "contents", "spam_spaminess", :float
          add_column "content_versions", "spam_signature", :string
          add_column "content_versions", "spam_spaminess", :float
        end

        def self.uninstall
          remove_column "contents", "spam_signature"
          remove_column "content_versions", "spam_signature"
          remove_column "contents", "spam_spaminess"
          remove_column "content_versions", "spam_spaminess"
        end
      end
    end
  end
end